# Author: Lovy
# File : brandManagePage
# Time : 2023-03-22 19:28
from common.basePage import BasePage
from pageObjects.pmPageObjectPage.pmPageInObjectPage.addBrandPage import AddBrandPage


class BrandManagePage(BasePage):
    def get_firstpage_brandnames(self):
        """
        :return list
        """
        # 获取多个元素 建议 重写 get_element_text
        return self.get_elements_text(self.all_brand_name_txt)

    def search_brand(self, brandname):
        """
        搜索品牌
        """
        self.input_text(self.brand_search_input, brandname)
        self.click_element(self.search_btn)

    def goto_addbrandpage(self):
        self.click_element(self.add_brand_btn)
        return AddBrandPage()




